package com.order.dao.bean;

import com.order.dao.DBUtil;

public class Nutrition {
	public boolean delnutrition(String id){
		int c=0;
		if(id!=null){
			String  sql="delete from vegenutrition where nutri_id='"+id+"'";
			System.out.println(sql);
			c=DBUtil.UpdateUserInfo(sql);
			if(c>0)return true;
			else return false;
		}
		else
		  return false;
	}
	public  boolean insertnutrition(String id,String name){
		String sql=null;
        sql=  "insert into vegenutrition values('"+id+"'";
	    sql+= ",'" + name + "')";
	    System.out.println(sql);
	    int c=DBUtil.UpdateUserInfo(sql);
	    if(c>0)return true;
	    else 
	    	return false;
	    
	}
	
	public   boolean updatenutrition(String id,String name)
    	{
		int c=0;
		String sql= "update vegenutrition set nutri_name='" + name +"' where nutri_id='"+id+"'";
		c=DBUtil.UpdateUserInfo(sql);
		System.out.println(sql);
		if(c>0)return true;
		else return false;
    	}
}
